home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1999 April / Cd Pc Users extra 19 abril 1999.iso / Prog / Inst / Js02 / js02.exe / jscripts / openmsgv01.js < prev    next >
Encoding:
JavaScript  |  1998-11-12  |  1.2 KB  |  40 lines

  1. //-------------------------------------------
  2. // JavaScript Code for Navigator 4+ and Internet Explore 4+
  3. //---------------------------------------------
  4. // signe_browser=0: Navigator 4
  5. // signe_browser=1: Internet Explore 4
  6. // OPEN OBJECT MESSAGE: the Ultime replacement of ALT
  7. // ly: object message please define <P CLASS=MESSAGE> in your style
  8. // xpos: left position of object
  9. // ypos: top position of object
  10. // msgtxt: message that must be defined by client
  11. //-------------------------------------------------
  12.  
  13. function open_message(signe_browser,ly,xpos,ypos,msgtxt){
  14.     var txt1='<DIV ID=TXT><P CLASS=MESSAGE>';
  15.     txt1 +=msgtxt;
  16.     txt1 +='</P></DIV>';
  17.     if (signe_browser==0){
  18.         document[ly].left=xpos;
  19.         document[ly].top=ypos;
  20.         document[ly].document.open();
  21.         document[ly].document.write(txt1);
  22.         document[ly].document.close();
  23.         document[ly].visibility="inherit";    
  24.     }
  25.     if (signe_browser==1){
  26.         document.all[ly].style.left=xpos;
  27.         document.all[ly].style.top=ypos;
  28.         document.all[ly].style.visibility="inherit";    
  29.     }
  30.  
  31.  
  32. }
  33. function close_message(signe_browser,ly){
  34.     if (signe_browser==0) document[ly].visibility="hidden";
  35.     if (signe_browser==1) document.all[ly].style.visibility="hidden";
  36.  
  37. }
  38.  
  39.  
  40.